<?php


namespace Convert\Controller;

use Think\Controller;

class AddonController extends BaseController
{

    public function _initialize()
    {
        parent::_initialize();
    }



    public function convert()
    {
        $table_list = addons_table();
        $this->assign('table_list', $table_list);
        $path = './Application/Convert/Data/addon.json';
        $json = file_get_contents($path);
        $data= json_decode($json,true);

        $this->assign('data', $data);
        $this->display();
    }


    protected  function getNext($current)
    {
        $table_list = addons_table();
        $next = get_next($table_list, $current);
        return $next?$next['name']:'finish';
    }


    protected function finish(){
        $return['status'] = 1;
        $return['info'] = '转移成功。';
        $this->ajaxReturn($return);
    }


}